$OpenBSD: patch-erlang-js-rebar_config,v 1.5 2016/05/13 04:29:58 jmatthew Exp $

Use external nspr and spidermonkey.  These need lots of patches.

--- deps/erlang_js/rebar.config.orig	Sat Apr 12 06:39:20 2014
+++ deps/erlang_js/rebar.config	Wed May 11 11:45:43 2016
@@ -10,8 +10,8 @@
 {port_specs, [{"priv/erlang_js_drv.so", ["c_src/*.c"]}]}.
 
 {port_env, [
-             {"DRV_CFLAGS", "$DRV_CFLAGS -I c_src/system/include/js -DXP_UNIX -Wall"},
-             {"DRV_LDFLAGS", "$DRV_LDFLAGS c_src/system/lib/libjs.a c_src/system/lib/libnspr4.a"},
+             {"DRV_CFLAGS", "$DRV_CFLAGS -I /usr/local/include/js -DXP_UNIX -Wall"},
+             {"DRV_LDFLAGS", "$DRV_LDFLAGS -L /usr/local/lib -lmozjs -lnspr4"},
 
              %% Define flags for enabling/disable 64 bit build of NSPR
              {"-32$", "NSPR_SIXTYFOUR", "--disable-64bit"},
@@ -40,5 +40,5 @@
 
             ]}.
 
-{pre_hooks, [{compile, "make c_src"}]}.
-{post_hooks, [{clean, "make c_src_clean"}]}.
+%%{pre_hooks, [{compile, "make -C c_src"}]}.
+%%{post_hooks, [{clean, "make -C c_src clean"}]}.
